﻿namespace OasisCiq.Xpil
{
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using XS;

    /// <summary>
    /// A Stock market listing details. The organisation 
    /// could be listed on more than one country
    /// </summary>
    public class Stock : IDataQualityGroup, IExtendedAttributes
    {
        /// <summary>
        /// The code name for the organisation as listed 
        /// in the exchange. E.g. MOT for Motorola Inc
        /// </summary>
        public CTString ListedCode { get; set; }

        /// <summary>
        /// Free text name of the stock exchange or 
        /// other market. E.g. NYSE or NZX
        /// </summary>
        public CTString MarketName { get; set; }

        /// <summary>
        /// Name of the country where listed
        /// </summary>
        public CTString CountryName { get; set; }

        /// <summary>
        /// Date of investment
        /// </summary>
        public XSDateTime InvestedDate { get; set; }

        /// <summary>
        /// Quantity of shares.....1 million shares
        /// </summary>
        public CTString ShareQuantity { get; set; }

        /// <summary>
        /// Date of listing
        /// </summary>
        public XSDateTime ListedDate { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public XSDateTime ValidTo { get; set; }

        public NameValueCollection ExtendedAttributes { get; set; }
    }
}
